$lightGreen: #b9e7e7;

.app {
  display: flex;
  justify-content: center;
  .container {
    width: 90%;

    .link {
      text-decoration: none;
      color: inherit;
    }
    //LOGIN & REGISTER

    .auth {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      height: 100vh;
      background-color: $lightGreen;

      h1 {
        font-size: 20px;
        color: teal;
        margin-bottom: 20px;
      }

      form {
        display: flex;
        flex-direction: column;
        padding: 50px;
        background-color: white;
        border-radius: 5px;
        width: 30%;
        gap: 20px;

        input {
          padding: 10px;
          border: none;
          border-bottom: 1px solid gray;
        }

        button {
          padding: 10px;
          border: none;
          border-radius: 5px;
          background-color: teal;
          cursor: pointer;
          color: white;
        }

        p {
          font-size: 12px;
          color: red;
          text-align: center;
        }

        span {
          font-size: 12px;
          text-align: center;
        }
      }
    }

    //NAVBAR

    .navbar {
      .container {
        width: 100%;
        padding: 10px 0px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        .logo {
          img {
            width: 120px;
          }
        }
        .links {
          display: flex;
          width: 50%;
          align-items: center;
          justify-content: space-between;
          gap: 10px;
          
          .ant-menu{
            width: 60% !important;
            font-size: 16px;
            font-weight: 300;
          }

          h6 {
            font-size: 16px;
            font-weight: 300;
            cursor: pointer;
          }

          .write {
            background-color: $lightGreen;
            min-width: 50px;
            min-height: 50px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 300;
            border: 1px solid white;

            &:hover {
              color: teal;
              background-color: white;
              border: 1px solid teal;
            }
          }
        }
      }
    }

    //FOOTER

    footer {
      margin-top: 100px;
      padding: 20px;
      background-color: $lightGreen;
      display: flex;
      align-items: center;
      justify-content: space-between;
      font-size: 12px;
      img {
        height: 50px;
      }
    }

    //HOME

    .home {
      .posts {
        margin-top: 50px;
        display: flex;
        flex-direction: column;
        gap: 150px;

        .post {
          width: 90%;
          display: flex;
          margin: 0 auto;
          gap: 100px;

          &:nth-child(2n + 1) {
            flex-direction: row-reverse;
          }

          .img {
            flex: 2;
            position: relative;

            &::after {
              content: "";
              width: 100%;
              height: 100%;
              background-color: $lightGreen;
              position: absolute;
              top: 20px;
              left: -20px;
              z-index: -1;
            }

            img {
              width: 100%;
              min-height: 400px;
              object-fit: cover;
            }
          }

          .content {
            flex: 3;
            width: 100%;
            display: flex;
            flex-direction: column;
            justify-content: space-between;

            h1 {
              word-break: break-all;
              word-wrap: break-word;
              font-size: 48px;
            }

            p {
              word-break: break-all;
              word-wrap: break-word;
              overflow: hidden;
              text-overflow:ellipsis;
              display: -webkit-box;
              -webkit-line-clamp: 3;
              -webkit-box-orient: vertical;
              max-height: 200px;
              font-size: 18px;
            }

            button {
              width: max-content;
              padding: 10px 20px;
              border: none;
              border-radius: 5px;
              cursor: pointer;
              background-color: white;
              border: 1px solid teal;
              color: teal;

              &:hover {
                border: 1px solid white;
                background-color: $lightGreen;
                color: black;
              }
            }
          }
        }
      }
    }

    //SINGLE

    .single {
      display: flex;
      gap: 50px;

      .content {
        flex: 5;
        display: flex;
        flex-direction: column;
        gap: 30px;

        img {
          width: 100%;
          height: 300px;
          border-radius: 5px;
          object-fit: cover;
          cursor: pointer;
        }

        .user {
          display: flex;
          align-items: center;
          margin-left: 3%;
          gap: 10px;
          font-size: 14px;
          img {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            object-fit: cover;
          }

          span {
            font-weight: bold;
          }
        }

        .edit {
          display: flex;
          gap: 5px;

          img {
            width: 20px;
            height: 20px;
            cursor: pointer;
          }
        }
        .td{
          width: 100%;
          height: 100%;
          border-radius: 5px;
          padding: 10px;
          background-color:rgba($color: $lightGreen, $alpha: .3);
        }
        h1 {
          margin-left: 3%;
          padding: 10px;
          word-break: break-all;
          word-wrap: break-word;
          font-size: 42px;
          color: #333;
        }

        p {
          word-break: break-all;
          word-wrap: break-word; 
          text-align: justify;
          line-height: 30px;
        }
        .desc{
          margin-left: 3%;
          padding: 10px;
          height: 100%;
        }
      }
      .menu {
        flex: 2;
        display: flex;
        flex-direction: column;
        gap: 25px;

        h1 {
          font-size: 20px;
          color: #555;
        }

        .post {
          display: flex;
          flex-direction: column;
          gap: 10px;

          img {
            width: 100%;
            height: 200px;
            border-radius: 5px;
            object-fit: cover;
          }

          h2 {
            color: #555;
          }

          button {
            width: max-content;
            padding: 7.5px 15px;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            color: teal;
            background-color: white;
            border: 1px solid teal;

            &:hover {
              border: 1px solid white;
              background-color: $lightGreen;
              color: black;
            }
          }
        }
      }
    }

    //WRITE

    .add {
      width: 100%;
      margin-top: 20px;
      display: flex;
      gap: 20px;

      .content {
        flex: 5;
        display: flex;
        flex-direction: column;
        gap: 20px;

        input {
          padding: 10px;
          border: 1px solid lightgray;
        }

        .editorContainer {
          height:300px;
          width: 100%;
          max-width: 1208px;
          .editor{
            height: 100%;
          }
        }
      }

      .menu {
        flex: 2;
        display: flex;
        flex-direction: column;
        gap: 20px;

        .item {
          border: 1px solid lightgray;
          padding: 16px;
          gap: 8px;
          flex:1;
          display: flex;
          flex-direction: column;
          justify-content: space-between;
          font-size: 12px;
          color: #555;

          h1{
            font-size: 20px;
          }

          .file{
            text-decoration: underline;
            cursor: pointer;
          }

          .buttons{
            display: flex;
            border-radius: 5px;
            justify-content: space-between;

        
            .clean {
              width: max-content;
              padding: 10px 20px;
              border: none;
              border-radius: 5px;
              cursor: pointer;
              background-color: white;
              border: 1px solid teal;
              color: teal;
    
              &:hover {
                border: 1px solid white;
                background-color: $lightGreen;
                color: black;
              }
            }
            :last-child{
              width: max-content;
              cursor: pointer;
              border-radius: 5px;
              color: white;
              background-color: teal;
              border: 1px solid teal;
              padding: 10px 20px;
            }
          }

          .cat{
            display: flex;
            align-items: center;
            gap: 2px;
            color: teal;
          }
        }
      }
    }
  }
}
